1. Field of the Invention
The invention relates generally to the field of digital data processing systems.
2. Description of the Prior Art
A typical digital data processing system includes three basic elements, namely a processor element, a memory element, and an input/output element. The memory element stores information in addressable storage locations. This information includes both data and instructions for processing the data. The processor element includes one or more digital data processing units, or "processors", each of which causes information to be transferred, or fetched, to it from the memory element, interprets the incoming information as either instructions or data, and processes the data in accordance with the instructions. The results are then stored in addressed locations in the memory element.
The input/output element also communicates with the memory element in order to transfer information into the system and to obtain the processed data from it. Units comprising the input/output element normally operate in accordance with control information supplied to it by the processor element. The control information defines the operation to be performed by the input/output unit. At least one class of operations performed by an input/output unit is the transfer of user information, that is, information used by a user program, between the input/output unit and the memory element. Typical units comprising the input/output element include, for example, printers, teletypewriters, and video display terminals, and may also include secondary information storage devices such as disk or tape storage units.
In addition to functioning as input/output devices, disk storage units and, sometimes, tape storage units may also function as part of the memory element. In particular, a memory element typically includes a main memory, whose contents are accessible to the processor relatively quickly but which is generally relatively high-cost storage. Modern main memories are typically implemented using MOS or bipolar semiconductor technology and may provide on the order of a fraction of a megabyte to several tens of megabytes of storage.
In either a multiprocessor system or in a singleprocessor system, there may be a significant degree of contention for the single memory resource as among the processors and input/output units. As a result of contention for memory, the processors are unable to retrieve data from, or store processed data in, the memory as fast as they might otherwise, thus slowing down processing. Some mechanisms have been devised to minimize memory contention, such as memory interleaving, which provides multiple memory units whose locations are interleaved in the address space. Another mechanism is the use of a write buffer, which stores processed data from the processor and transmits it to memory. The write buffer receives data only from the one processor, and thus there is no contention for the write buffer. The write buffer then tries to transfer the data to memory for storage. The write buffer thus is affected by the contention for the memory, not the processor.
A problem arises, however, with the use of a write buffer. If the memory detects an error during the write operation, it is desirable for the processor to be able to perform an error recovery operation within the context which generated the written data. Some circumstances under which a processor switches contexts can be detected by circuitry controlling the write buffer, which may then cause the processor to stop operations until the write buffer has been flushed. This may occur, for example, when a device external to the processor requests interrupt service by the processor and the interrupt request has been granted. However, there are many circumstances under which a context switch cannot be detected by circuitry external to the processor, such as a software interrupt or exception, a return from exception or interrupt processing, a switch between an applications program and operating system service, and so forth. In all of these circumstances, a context switch is performed wholly within the processor.